1. Field of the Invention
The present invention relates to a technique that handles data encrypted using a key.
2. Description of the Related Art
Conventionally, as a method of verifying, when encrypted data (encrypted text data) and a key are input, if this key is required to correctly decrypt the encrypted text data, the following method is generally used. That is, a method of verifying the key by decrypting the encrypted text data using the key and determining if the decrypted result is correct is used. Japanese Patent Laid-Open No. 10-231778 discloses a method of finding, when the encrypted text data cannot be correctly decrypted, where an error has occurred in an encryption process.
However, the conventional verification method can only execute verification after the encrypted text data is decrypted to obtain the decrypted result, i.e., full encryption source data (plaintext data). For example, this is the case when plaintext data is image data, and determination is made using an image data display program that executes display processing after full image data is input. In this case, when the relationship between the key and encrypted text data is not correct for some reason, if the decryption processing of this encrypted text data is executed using this key, the decrypted result is not original plaintext data, thus wasting a time and computation spent for decryption. Furthermore, if this occurs when the size of encrypted text data is large, the process performance deteriorates considerably.